package beanstao.util.type.base;

import java.text.ParseException;
import java.util.Calendar;

import beanstao.util.Util;


public class String2Calendar extends DateTimeCastor<String, Calendar>
{

	@Override
	public Calendar cast(String src, Class<?> toType, String... args)
	{
		Calendar c = Calendar.getInstance();
		try
		{
			c.setTime(dateTimeFormat.parse(src));
		}
		catch (ParseException e)
		{
			throw Util.wrapThrow(e);
		}
		return c;
	}

}
